//
//  TTDiamondDetailGrayInfoViewCell.m
//  TaoTuo
//
//  Created by admin on 2019/10/24.
//  Copyright © 2019 admin. All rights reserved.
//

#import "TTDiamondDetailGrayInfoViewCell.h"

@interface TTDiamondDetailGrayInfoViewCell ()

@property (nonatomic, strong) UIView *bgView;
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UILabel *rightLabel;

@end

@implementation TTDiamondDetailGrayInfoViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.backgroundColor = [UIColor whiteColor];
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        [self setupSubviews];
        
    }
    return self;
}

- (void)setDic:(NSDictionary *)dic
{
    _dic = dic;
    
    self.titleLabel.text = dic[@"leftTitle"];
    self.rightLabel.text = dic[@"rightTitle"];
    
}

- (void)setupSubviews
{
    _bgView = [[UIView alloc] init];
    _bgView.backgroundColor = UIColorHex(F1F5F6);
    _bgView.layer.cornerRadius = 5;
    [self.contentView addSubview:_bgView];
    [_bgView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(2);
        make.left.mas_equalTo(5);
        make.bottom.mas_equalTo(-2);
        make.right.mas_equalTo(-5);
    }];
    
    _titleLabel = [UILabel labelWithTitle:@"" color:UIColorHex(333333) fontSize:13];
    [_bgView addSubview:_titleLabel];
    [_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(5);
        make.top.height.equalTo(self.bgView);
    }];
    
    _rightLabel = [UILabel labelWithTitle:@"" color:UIColorHex(999999) fontSize:11];
    [_bgView addSubview:_rightLabel];
    [_rightLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.bgView).mas_offset(-8);
        make.top.height.equalTo(self.bgView);
    }];
    
    
}


@end
